package cn.community.system.mapper;

import cn.community.system.domain.Department;
import cn.community.system.query.DepartmentQuery;
import cn.community.system.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface  DepartmentMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Department department);

    Department selectByPrimaryKey(Long id);

    List<Department> selectAll();

    int updateByPrimaryKey(Department department);

    List<Department> selectForList(QueryObject qo);

    Long findIdByDepartment(String dept);

    Long findByAssocitionId(Long id);

    List<Department> selectForAssoList(DepartmentQuery qo);

    Department getByAssoId(Long id);

    Department listDeptByAssoId(Long id);

    Department getByAssoIdAndDeptname(@Param("assoId") Long assoId, @Param("deptname")String deptname);
}
